package dao

import (
	"yundian/internel/app/models/rewardlog"
	"yundian/internel/pkg/dingo"
	"yundian/internel/pkg/dingo/global"
)

type RewardLogDao struct {

}

func NewRewardLogDao() *RewardLogDao {
	return &RewardLogDao{}
}

func (dao *RewardLogDao) Insert(m *rewardlog.RewardLog) *dingo.ErrorWrap {
	db := global.Orm.Table("reward_log").Create(m)
	return dingo.ErrorIf(db.Error, true)
}
